<script setup lang="ts">
const loading = ref(false),
  loading1 = ref(false);
</script>

<template>
  <div>
    <h1 class="title">1.v-loading</h1>
    <div class="btns">
      <button class="btn" @click="loading = true">加载</button>
      <button class="btn" @click="loading = false">加载完成</button>
    </div>
    <div v-loading="loading" class="module">加载指令</div>
    <div class="btns">
      <button class="btn" @click="loading1 = true">加载</button>
      <button class="btn" @click="loading1 = false">加载完成</button>
    </div>
    <div v-loading="loading1" class="module">加载指令</div>
  </div>
</template>

<style scoped lang="scss"></style>

<route>
{
  meta: {
    cache: true,
    roles: ['admin','visitor'],
    menu: false
  }
}
</route>
